package com.gxy.learn.backup.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;


/**
 * @PropertySource+@Value
 * 注意 该方式不支持yml文件读取。
 */
@Data
@Component
@PropertySource(value = { "classpath:application-dev.properties" })
public class PropertySourceAndValueConfig {
    @Value("${com.gxy.learn.am.user.userName}")
    private String userName;
    @Value("${com.gxy.learn.am.user.sex}")
    private Integer sex;
    @Value("${com.gxy.learn.am.user.age}")
    private Integer age;
    @Value("${com.gxy.learn.am.user.address}")
    private String address;

}
